Add support for gchart's newer library loader #113
+14
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After encountering several problems loading Google Charts (gchart) via Ajax I've added support for Google Chart's preferred library loading method.
As of Feburary 16, 2016:
Source
For compatibility reasons both methods are supported but you may decide to dismiss the old method in favor of the new one.
The following problems were solved with the proposed changes:
unreliable rendering of charts loaded via Ajax
parser-blocking warning
In addition using the new library loading method enables true asynchronous Ajax requests for loading charts whereas
async: false
must have been set using the old method.To use the preferred method you should load the library like described in this example. This may be added to your documentation.